class Solution {
public:
    vector<int> twoSum(vector<int>& numbers, int target) {
        int l = 0, r = numbers.size() - 1;
        while(true)
        {
            int m = numbers[l] + numbers[r];
            if(m == target) return { l + 1, r + 1 };
            
            m < target ? l++ : r--;
        }
        return { -1, -1 };
    }
};
